﻿@model IEnumerable<Hostal.Bussines.Entities.TipoHabitacione>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>

@using (Html.BeginForm())
{
    <fieldset>
        <legend>Buscar Tipo de Habitaciones</legend>
        <table>
            <tr>
                <td><b>Criterio:</b></td>
                <td>@Html.TextBox("criterio")</td>
                <td><input type="submit" name="btnBuscar" value="Buscar" /></td>
            </tr>
        </table>    
        
    </fieldset>
}

<table>
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.IdHabitacion)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.Descripcion)
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.IdHabitacion)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.Descripcion)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new {  id=item.IdHabitacion }) |
            @Html.ActionLink("Delete", "Delete", new {  id=item.IdHabitacion },
            new  { onClick="return confirm('Desea Eliminar la Habitacion: " + @item.Descripcion +"?');"})
        </td>
    </tr>
}

</table>
